//按钮点击事件
import { ajax, toast, print, cardCache } from 'nc-lightapp-front';
import linkBudgetApi from '../../../../../public/components/linkbudget/linkbudget';
import linkVoucherApi from '../../../../../public/components/linkvoucher/linkvoucher';
import linkQueryApi from '../../../../../public/components/linkquery/linkquerybills';
import config from '../config';
import _ from 'lodash-es';

export default function (props, key) {
    console.log('props',props,'key:',key)

    if( key === 'edit'){ // 修改按钮功能区域
        this.handleEdit()        
    }

    else if( key === 'copy'){ // 快速复制功能区域
        return this.handleInitQuickCopy()
    }

    else if( key === 'export'){ // 导出功能区域
        this.handleExport()
    }

    else if( key === 'import'){ // 导入功能区域
        return this.handleImport()
    }

    else if( key === 'save'){ // 保存功能
        this.save()
    }

    else if( key === 'add'){ // 增行
        this.addTableLine()
    }

    else if( key === 'enable'){ // 启用
        this.handleStartOrEndUse('enable')
    }

    else if( key === 'disable'){ // 停用
        this.handleStartOrEndUse('disable')
    }

    else if( key === 'delete'){ // 删除
        this.handleShowOrHideDeleteModal(true)
    }

    else if( key === 'cancle'){ // 取消
        this.handleCancle()
    }

    
    

    

    
}
